<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<h1 id="a">倒计时开始！！！！！</h1>
		
	</body>
	<script type="text/javascript">
		var m = 2;
		var s = 0;
		var h = 0;
		var hh = parseInt(h);
		var mm = parseInt(m);
		var ss = parseInt(s);
		setTimeout("dao()",2000);
		function dao(){
			document.getElementById("a").innerHTML="<h1>"+Bu(hh)+":"+Bu(mm)+":"+Bu(ss)+"</h1>";
			if(mm==0&&ss==0&&hh==0){
					document.getElementById("a").innerHTML="砰！！！！！！！";
					return;
			}
			if(ss==0&&mm!=0){
				mm=mm-1;
				ss=60;	
			}
			if(mm==0&&hh!=0&&ss==0){
				hh=hh-1;
				mm=59;
				ss=60;
			}
			ss--;
			setTimeout("dao()",1000);
		}
		
		function Bu(n){
			if(n<10){
				return "0"+n;
			}else{
				return n;
			}
		}
	</script>
</html>
